package cn.v5cn.rancher.demo.controller;

import cn.v5cn.rancher.demo.entity.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.Instant;

@RestController
@RequestMapping("/demo")
public class IndexController {

    @GetMapping("/index")
    public Object index() {
        User user = new User();
        user.setId(Instant.now().getEpochSecond());
        user.setName("张三");
        user.setAge(21);
        return user;
    }
}
